package walker

type GroupBuilder struct {
	currentID int
}

func (gb *GroupBuilder) NewGroup(name, dir, pic string, st *site) *group {

	if st == nil {
		st = siteNull
	}

	g := &group{
		ID:    gb.currentID,
		Name:  name,
		Pic:   pic,
		Dir:   dir,
		Site:  st,
	}
	
	g.writeGroupId()

	gb.currentID++

	return g
}

func NewVod(dir string, g *group, videoTitleFilter int) *vod {
	vod_i := new(vod)
	vod_i.Dir = dir
	vod_i.Group = g
	// vod_i.IsFolder = false
	vod_i.VideoTitleFilter = videoTitleFilter
	return vod_i
}

func NewSite(siteID int, name, key, rootdir string) (st *site) {

	st = &site{
		ID:      siteID,
		Name:    name,
		Key:     key,
		RootDir: rootdir,
	}
	return st
}
